# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=signon-ui
pkgver=0.18_git20231016
pkgrel=0
_commit="eef943f0edf3beee8ecb85d4a9dae3656002fc24"
# armhf, ppc64le, s390x, riscv64 blocked by qt6-qtwebengine
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://gitlab.com/accounts-sso/signon-ui"
pkgdesc="Signond Qt UI"
license="GPL-3.0-only"
makedepends="
	libaccounts-qt-dev
	libnotify-dev
	libproxy-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtwebengine-dev
	signond-dev
	"
source="https://gitlab.com/accounts-sso/signon-ui/-/archive/$_commit/signon-ui-$_commit.tar.gz"
options="!check" # Test compilation is broken
builddir="$srcdir/$pkgname-$_commit"

prepare() {
	default_prepare

	# Don't build tests, they still require Webkit
	sed -e "s|src \\\|src|" -e "/tests/d" -i signon-ui.pro
}

build() {
	/usr/lib/qt6/bin/qmake \
		PREFIX=/usr \
		LIBDIR=/usr/lib
	make
}

package() {
	INSTALL_ROOT="$pkgdir" make install
}

sha512sums="
919df68ecc20e81a2591f4ab569d21213d052dd8a392d0fb58e892c19b94bafb5041995491b413212773dee9b58f34c1b26f6d37e6049fb8638a37e66c22c6d4  signon-ui-eef943f0edf3beee8ecb85d4a9dae3656002fc24.tar.gz
"
